<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link href="css/login.css" rel="stylesheet">
</head>

<body>
<div id="loginDiv">
    <form action="/moming/loginServlet" method="post" id="form">
        <h1 id="loginMsg">新闻管理登录页面</h1>
        <div id="errorMsg">${msg}</div>
        <p>账号:<input id="username" name="username"  type="text"></p>
        <p>密码:<input id="password" name="password" value="${cookie.password.value}" type="password"></p>
        <p>记住密码:<input id="remeber" name="remeber" value="1" ${cookie.username.value!=null?'checked':''} type="checkbox"></p>
        <div id="subDiv">
            <input type="submit" class="button" value="登录">
            <a href="register.jsp">没有账号？点击注册</a>
        </div>
    </form>
</div>
<script>
    let v = decodeURI('${cookie.username.value}');
    document.getElementById("username").value=v;
</script>
</body>
</html>
